home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / datescrn.arc / SCR_COLR.C < prev    next >
Encoding:
Text File  |  1985-12-12  |  2.1 KB  |  53 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* This function was written by Jim Niederriter for the Lattice `C' Compiler*/
  4. /* on the IBM Personal Computer or compatible, running DOS 2.0.             */
  5. /*                                                                          */
  6. /* It requires that the system be booted with a CONFIG.SYS file on the boot */
  7. /* disk containing the record: DEVICE=ANSI.SYS                              */
  8. /*                                                                          */
  9. /* In addition, the ANSI.SYS file from the DOS 2.0 disk should also be on   */
  10. /* the boot disk.                                                           */
  11. /*                                                                          */
  12. /* See Chapter 13 of the DOS 2.0 Manual for further explanation.            */
  13. /*                                                                          */
  14. /****************************************************************************/
  15.  
  16. /*  scr_colr() */
  17. /*  this function sets all screen output that follows to the shade,     */
  18. /*  color, or attribute that corresponds to the color code passed       */
  19.  
  20. int scrn_hi(color)
  21. int color;
  22. {
  23.      cprintf("\x1B[%dm", color);
  24. }
  25.  
  26. /* COLOR CODES:
  27.      
  28.       0 = Normal white on black
  29.       1 = High intensity
  30.       4 = Underscore on (IBM mono display only)
  31.       5 = Blink on 
  32.       7 = Reverse video on
  33.       8 = Cancelled on (invisible)
  34.      30 = Black foreground
  35.      31 = Red foreground
  36.      32 = Green foreground
  37.      33 = Yellow foreground
  38.      34 = Blue foreground
  39.      35 = Magenta foreground
  40.      36 = Cyan foreground
  41.      37 = White foreground
  42.      40 = Black background
  43.      41 = Red Background
  44.      42 = Green background
  45.      43 = Yellow background
  46.      44 = Blue background
  47.      45 = Magenta background
  48.      46 = Cyan background
  49.      47 = White Background
  50. */
  51.  
  52.      
  53.